
/*

Design Pattern Automation Toolkit.
Application to create applications with emphasis on Design patterns.
And support for round trip engineering.
Copyright (C) 2004 Vineeth Neelakant. nvineeth@gmail.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

*/
using System;
using System.Collections;
using DesignPatternDefinitions;

namespace DotNetReverseEngineering
{
	/// <summary>
	/// Implements IProject
	/// </summary>
	internal class RevEnggProjectInfo : IProject
	{
		ArrayList components;

		internal RevEnggProjectInfo()
		{
			// 
			// TODO: Add constructor logic here
			//
		}
		#region IProject Members

		public System.Collections.ArrayList Components
		{
			get
			{
				return this.components;
			}
			set
			{
				this.components=(ArrayList) value;
			}
		}

		string projSummary=string.Empty;
		public string ProjectSummary
		{
			get
			{
				return this.projSummary;
			}
			set
			{
				this.projSummary=(string) value;
			}
		}

		string projAuthor=string.Empty;
		public string ProjectAuthor
		{
			get
			{
				return this.projAuthor;
			}
			set
			{
				this.projAuthor=(string) value;
			}
		}

		string projName="ReverseEnggProject";
		public string ProjectName
		{
			get
			{
				return this.projName;
			}
			set
			{
				this.projName=(string) value;
			}
		}

		public IClass GetClass(string componentName,string className)
		{
			return this.GetComponent(componentName).
				GetClass(className);
		}
		
		public IProjectComponent GetComponent(string componentName)
		{
			foreach (IProjectComponent comp in this.components)
				if(comp.ComponentName == componentName)
					return comp;
			return null;
		}

		#endregion
	}
}
